<cfcomponent output="true">

	<cfproperty name="PageTitle" type="string" />
	<cfproperty name="JSList" type="string" />
	<cfproperty name="CSSList" type="string" />
    <cfproperty name="ActiveLink" type="string" />
    <cfproperty name="PageContent" type="string" />
    <cfproperty name="SideBar" type="string" />
    
    <cffunction name="init" access="public" returntype="layout" output="false">
        <cfargument name="PageTitle" type="string" required="no" default="EPAR">
        <cfargument name="JSList" type="string" required="no" default="">
        <cfargument name="CSSList" type="string" required="no" default="">
        <cfargument name="ActiveLink" type="string" required="no" default="Home">
        <cfargument name="PageContent" type="string" required="no" default="Hello World!">
        <cfargument name="SideBar" type="string" required="no" default="">
        
        <cfscript>                        
            setPageTitle(arguments.PageTitle);  
            setJSList(arguments.JSList);    
            setCSSList(arguments.CSSList);     
            setActiveLink(arguments.ActiveLink);
            setPageContent(arguments.PageContent); 
            if( arguments.SideBar EQ "Termination"){
                setSideBar(arguments.SideBar);
            }
            return this;             
        </cfscript>
    </cffunction>
    
    <cffunction name="setSideBar" access="public" output="false" returntype="void">
        <cfargument name="SideBar" type="string" required="true" />
        <cfset this.SideBar = arguments.SideBar />
        <cfreturn />
    </cffunction>
    
    <cffunction name="getSideBar" access="public" output="false" returntype="string">
        <cfreturn this.SideBar />
    </cffunction>
    
    <cffunction name="getActiveLink" access="public" output="false" returntype="string">
        <cfreturn this.ActiveLink />
    </cffunction>

    <cffunction name="setActiveLink" access="public" output="false" returntype="void">
        <cfargument name="ActiveLink" type="string" required="true" />
        <cfset this.ActiveLink = arguments.ActiveLink />
        <cfreturn />
    </cffunction>
    
	<cffunction name="getPageTitle" access="public" output="false" returntype="string">
		<cfreturn this.PageTitle />
	</cffunction>

	<cffunction name="setPageTitle" access="public" output="false" returntype="void">
		<cfargument name="PageTitle" type="string" required="true" />
		<cfset this.PageTitle = arguments.PageTitle />
		<cfreturn />
	</cffunction>

	<cffunction name="getJSList" access="public" output="false" returntype="string">
		<cfreturn this.JSList />
	</cffunction>

	<cffunction name="setJSList" access="public" output="false" returntype="void">
		<cfargument name="JSList" type="string" required="true" />
		<cfset this.JSList = arguments.JSList />
		<cfreturn />
	</cffunction>

	<cffunction name="getCSSList" access="public" output="false" returntype="string">
		<cfreturn this.CSSList />
	</cffunction>

	<cffunction name="setCSSList" access="public" output="false" returntype="void">
		<cfargument name="CSSList" type="string" required="true" />
		<cfset this.CSSList = arguments.CSSList />
		<cfreturn />
	</cffunction>
        
    <cffunction name="setPageContent" access="public" output="false" returntype="void">
        <cfargument name="PageContent" type="string" required="true" />
        <cfset this.PageContent = arguments.PageContent />
        <cfreturn />
    </cffunction>
    
    <cffunction name="getPageContent" access="public" output="false" returntype="string">
        <cfreturn this.PageContent />
    </cffunction>    
    
    <cffunction name="SideBar" access="public" output="true" returntype="any">
        <div id="sidebar">
                    <ul>
                        <li id="search">
                        <h2>Search</h2>
                        <cfform name="EmployeeSearch" method="post" action="employeesearch.cfm">
                            <cfinput type="text" id="SearchString" name="SearchString" value="#session.SearchString#" />
                            <cfinput type="submit" id="Search" name="Search" value="Search" />
                        </cfform>
                        </li>
                        <li>
                            <h2>Quick Links</h2>
                            <ul>
                                <cfoutput>
                                    <cfif Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR or Session.strAuthType EQ Session.LIAISONS>
                                        <li><a href="/#session.rootDir#/NonSCF/Step1-Request.cfm">Liaisons:  Contractor Request</a></li>
                                    <cfelse>
                                        <li>Liaisons:  Contractor Request</li>
                                    </cfif>
                                    <cfif Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR or Session.strAuthType EQ Session.MANAGERS or Session.bolManager>
                                        <li><a href="/#session.rootDir#/SCF/Step1-Hire.cfm">Managers:  Initiate Hiring</a></li>
                                    <cfelse>
                                        <li>Managers:  Initiate SCF Hiring</li>
                                    </cfif>
                                    <cfif Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR or Session.strAuthType EQ Session.MANAGERS or Session.bolManager>
                                        <li><a href="/#session.rootDir#/SCF/EPLSFailedReport.cfm">HR:  EPLS</a></li>
                                    <cfelse>
                                        <li>HR:  EPLS</li>
                                    </cfif>
                                    <cfif Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR>
                                        <li><a href="/#session.rootDir#/SCF/PrintBadgeReport.cfm">HR:  Badge Creation Report</a></li>
                                    <cfelse>
                                        <li>HR:  Badge Creation Report</li>
                                    </cfif>
                                    <cfif Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR or Session.strAuthType EQ Session.FINANCE>
                                        <li><a href="/#session.rootDir#/SCF/PrintFinanceReport.cfm">Finance: Employee ## Report</a></li>
                                    <cfelse>
                                        <li>Finance: Employee ## Reportt</li>
                                    </cfif>
                                    <cfif Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR or Session.strAuthType EQ Session.FACILITIES>
                                        <li><a href="/#session.rootDir#/SCF/PrintAccessControlReport.cfm">Facilities: Access Control Report</a></li>
                                    <cfelse>
                                        <li>Facilities: Access Control Report</li>
                                    </cfif>
                                    <cfif Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR or Session.strAuthType EQ Session.MANAGERS or Session.bolManager>
                                        <li><a href="/#session.rootDir#/termination/">EPAR Termination</a></li>
                                    <cfelse>
                                        <li>EPAR Termination</li>
                                    </cfif>
                                    <cfif Session.strAuthType NEQ Session.MANAGERS>
                                        <li><a href="/#session.rootDir#/EPARDocumentation.doc">Help Documentation</a></li>
                                    </cfif>
                                </cfoutput>
                            </ul>
                        </li>
                    </ul>
                </div>
    </cffunction>
    
    <cffunction name="SideBarTermination" access="public" output="true" returntype="any">
        <div id="sidebar">
            <ul>
                <li id="search">
                <h2>Search</h2>
                <cfform name="EmployeeSearch" method="post" action="appsearch.cfm">
                    <cfinput type="text" id="SearchString" name="SearchString" value="Search" />
                    <cfinput type="submit" id="Search" name="Search" value="Search" />
                </cfform>
                </li>
                <li>
                    <h2>Quick Links</h2>
                    <ul>
                        <cfif Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR or Session.strAuthType EQ Session.LIAISONS>
                            <li><a href="SCF/Step1-Request.cfm">Managers: Request Termination</a></li>
                        <cfelse>
                            <li>Managers: Request Termination</li>
                        </cfif>
                        <cfif Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR or Session.strAuthType EQ Session.LIAISONS>
                            <li><a href="/#Session.RootDir#/NonSCF/Expiration/Review.cfm">Managers: NonSCF AD Expiration</a></li>
                        </cfif>
                        <cfif Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR or Session.strAuthType EQ Session.LIAISONS>
                            <li><a href="/#Session.RootDir#/NonSCF/Expiration/MasterReview.cfm">HR: NonSCF AD Expiration</a></li>
                        </cfif>
                        <cfif Session.strAuthType EQ Session.IT >
                            <li><a href="/#Session.RootDir#/termination/scf/disableuser.cfm">IT: Disable User</a></li>
                        <cfelse>
                            <li>IT: Disable User</li>
                        </cfif>
                        <li><a href="/#Session.RootDir#/status.cfm">EPAR Hire</a></li>
                        <cfif Session.strAuthType NEQ Session.MANAGERS>
                            <li><a href="/#session.rootDir#/media/documents/EPAR Termination.docx">Help Documentation</a></li>
                        </cfif>
                    </ul>
                </li>
            </ul>
        </div>
    </cffunction>
    
    <cffunction name="MenuBar" access="public" output="true" returntype="any">
        <div id="menu">
            <table>
                <tr>
                    <td <cfif this.ActiveLink eq 'Home'>class='active'</cfif>><a href="/#session.rootDir#/">Home</a></td>
                    <td <cfif this.ActiveLink eq 'Status'>class='active'</cfif>><a href="/#session.rootDir#/status.cfm">Status</a></td>
                   <!--- <td <cfif this.ActiveLink eq 'Stats'>class='active'</cfif>><a href="/#session.rootDir#/stats.cfm">Statistics</a></td>--->
                </tr>
            </table>
        </div>
    </cffunction>
    
    <cffunction name="MenuBarTermination" access="public" output="true" returntype="any">
        <div id="menu">
            <table>
                <tr>
                    <td <cfif this.ActiveLink eq 'Home'>class='active'</cfif>><a href="/#session.rootDir#/Termination/">Home</a></td>
                    <td <cfif this.ActiveLink eq 'Status'>class='active'</cfif>><a href="/#session.rootDir#/termination/status.cfm">Status</a></td>
                </tr>
            </table>
        </div>
    </cffunction>
    
	<cffunction name="html" access="public" output="true" returntype="Any">        
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title><cfoutput>#this.PageTitle#</cfoutput></title>
        <meta name="keywords" content="" />
        <meta name="description" content="" />
        <meta content="no-cache" />
        
        <link href="/#session.StaticPages#/css/default.css" rel="stylesheet" type="text/css" />
        <cfif ListLen(this.CSSList) gt 0>
            <cfloop list="#this.CSSLIst#" index="css" delimiters=",">
                <link href="<cfoutput>#css#</cfoutput>" rel="stylesheet" type="text/css" />
            </cfloop>
        </cfif>        
        
        <script language="Javascript" type="text/javascript" src="/jquery/jquery-1.4.2.min.js"></script>
        <cfif ListLen(this.JSList) gt 0>
            <cfloop list="#this.JSList#" index="js" delimiters=",">             
                <script language="Javascript" type="text/javascript" src="<cfoutput>#js#</cfoutput>" ></script>             
            </cfloop>
        </cfif>
        
        </head>              
        
        <body>
            <!-- start header -->
            <div id="header">
                <div id="logo">
                    <h1><a href="/#session.rootDir#/index.cfm">E-PAR</a></h1>
                    <h2>Electronic Personnel Action Request</h2>
                </div>
            </div>
            <!-- end header -->
            <!-- start page -->
            <div id="page">
                <!---MenuBar--->
                <cfif getSideBar() EQ "Termination">
                    #MenuBarTermination()#
                <cfelse >
                    #MenuBar()#
                </cfif>
                <!---MenuBar--->
                <!-- start content -->
                <div id="content">
                <div class="post">
                
                <cfif this.PageContent NEQ 'Denied'>
                    #this.PageContent()#
                <cfelse>
                    <h1>You do not have access to this page.</h1>
                    <a href="http://www.scfonline.net">Intranet Home Page</a> 
                </cfif>
                
                </div>
	            </div>
	            <!-- end content -->
	            
	            <!-- start sidebar -->
                <!---sidebar--->
                <cfif getSideBar() EQ "Termination">
                    #SideBarTermination()#
                <cfelse >
	                #SideBar()#
	            </cfif>
                <!---sidebar--->
	            <!-- end sidebar -->
	            </div>
	            <cfoutput>
	                <div id="footer">
	                    <p id="legal">&copy;2007-#dateformat(now(),"YY")# Southcentral Foundation.</p>
	                </div>
	            </cfoutput>
	            </body>
	        </html>
        
		<cfreturn />
	</cffunction>
    
    
    
</cfcomponent>